/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidad;

import java.util.ArrayList;
import java.util.List;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.Table;


/**
 *
 * @author HERX
 */
@Entity
@DiscriminatorValue("ACTOR")
public class Actor extends Person{
    
    //Work in progress
    @ManyToMany
    List<Movie> movies;

    public List<Movie> getMovies() {
        return movies;
    }

    public void setMovies(List<Movie> movies) {
        this.movies = movies;
    }
    
    public void addMovies (Movie movie) {
       if (this.movies == null){
           this.movies= new ArrayList<Movie>();
       }
       this.movies.add(movie);     
    }
}
